package STUDENT.TRINHQUANGXUANDUC.OPPS.RESGITER;

public class Models {

	public boolean CheckRegistration(UserOject objOject) {
		if (objOject.getTuoi() < 19) {
			return false;
		}
		if (objOject.getTuoi() >= 19 && objOject.getGioitinh() == 0 && objOject.getTinhtranghn() == 1
				|| objOject.getTinhtranghn() == 2) {
			return true;
		}
		if (objOject.getTuoi() >= 22 && objOject.getGioitinh() == 1 && objOject.getTinhtranghn() == 1
				|| objOject.getTinhtranghn() == 2) {
			return true;
		}
		return false;
	}
}
